home *** CD-ROM | disk | FTP | other *** search
- 10 ' ********** PGM : XTMENU - UTILITIES **********
- 20 ' ********** AUTHOR : DAVE ARMBRUSTER SEPTEMBER 1984 **********
- 30 ' ********** VERSION : 1.2 **********
- 40 '
- 50 SELECT = 6 'ENTER NUMBER OF SUBDIRECTORY APPLICATIONS HERE
- 60 KEY OFF:CLS:GOSUB 1020
- 70 CLS:COLOR 6,0,0
- 80 LOCATE 1,1,0:PRINT " ----------------------------- ";:COLOR 7,0,0:PRINT"PRIMARY MENU";:COLOR 6,0,0:PRINT" ----------------------------- "
- 90 DAY$=DATE$:COLOR 6,0,0:LOCATE 2,61,0:PRINT"DATE : ";:COLOR 0,7,0:PRINT DAY$
- 100 TIM$=TIME$:COLOR 6,0,0:LOCATE 4,61,0:PRINT"TIME : ";:COLOR 0,7,0:PRINT TIM$
- 110 COLOR 6,0,0:LOCATE 6,12,0:PRINT "F1 APPLICATION - Select library foreground job"
- 120 LOCATE 7,12,0:PRINT "F2 UTILITY - PC Utilities"
- 130 LOCATE 8,12,0:PRINT "F3 BASICA - Exit to Basic Programming Language"
- 140 LOCATE 9,12,0:PRINT "F4 MESSAGE - Post System Message"
- 150 LOCATE 10,12,0:PRINT "F5 SYSTEM - Exit to Disk Operating System"
- 160 COLOR 7,0,0:LOCATE 2,4,0:PRINT"OPTION ===>>"
- 170 COLOR 0,7,0:SEL$=""
- 180 WHILE SEL$<>"1" AND SEL$<>"2" AND SEL$<>"3" AND SEL$<>"4" AND SEL$<>"5"
- 190 TIM$=TIME$:LOCATE 4,68,0:PRINT TIM$
- 200 POKE 106,0
- 210 SEL$=INKEY$
- 220 WEND:COLOR 7,0,0
- 230 IF SEL$="X" OR SEL$="x" THEN CLS:SYSTEM
- 240 X=VAL(SEL$):LOCATE 2,16,0:PRINT X
- 250 FOR I=1 TO 500:NEXT I
- 260 IF X=5 THEN CLS:SYSTEM
- 270 ON X GOTO 350,920,290,580
- 280 '
- 290 ' ========== SETUP PROGRAMMING ENVIRONMENT ==========
- 300 '
- 310 KEY 1,"LIST":KEY 2,"RUN":KEY 3,"CLS":KEY 4,"FILES"+CHR$(13):KEY 5,"LOCATE ":KEY 6,"COLOR "
- 320 KEY 7,"SYSTEM"+CHR$(13):KEY 8,"TRON":KEY 9,"TROFF":KEY 10,"KEY"
- 330 KEY ON:COLOR 6,0,0:CLS:NEW
- 340 '
- 350 ' ========== APPLICATION MENU ==========
- 360 '
- 370 CLS:COLOR 6,0,0
- 380 LOCATE 1,1,0:PRINT " ---------------------------- ";:COLOR 7,0,0:PRINT"APPLICATION MENU";:COLOR 6,0,0:PRINT" ----------------------------"
- 390 DAY$=DATE$:COLOR 6,0,0:LOCATE 2,61,0:PRINT"DATE : ";:COLOR 0,7,0:PRINT DAY$
- 400 TIM$=TIME$:COLOR 6,0,0:LOCATE 4,61,0:PRINT"TIME : ";:COLOR 0,7,0:PRINT TIM$
- 410 COLOR 6,0,0
- 420 FOR I=6 TO 12:LOCATE I,12,0:PRINT OPT$(I-5):NEXT I
- 430 COLOR 7,0,0:LOCATE 2,4,0:PRINT"PRESS OPTION LETTER ===>>"
- 440 COLOR 0,7,0:S$="":X=999
- 450 WHILE S$<>"1" AND S$<>"2" AND S$<>"3" AND S$<>"4" AND S$<>"5" AND S$<>"6" AND S$<>"7"
- 460 TIM$=TIME$:LOCATE 4,68,0:PRINT TIM$
- 470 POKE 106,0
- 480 S$=INKEY$
- 490 WEND:COLOR 7,0,0
- 500 IF S$="M" OR S$="m" THEN 70
- 510 X=VAL(S$):LOCATE 2,30,0:PRINT X
- 520 IF X=7 THEN 70
- 530 FOR I=1 TO SELECT
- 540 IF X=I THEN CHDIR DIR$+PATH$(I)
- 550 NEXT I
- 560 CLS:SYSTEM
- 570 '
- 580 ' ========== MESSAGE ROUTINE ==========
- 590 '
- 600 COLOR 6,0,0:CTR=8:CLS:LOCATE 1,1,0:PRINT " ---------------------------- ";:COLOR 7,0,0:PRINT"BULLETIN BOARD";:COLOR 6,0,0:PRINT" ---------------------------- ":COLOR 7,0,0
- 610 LOCATE 3,16,0:PRINT"F1 ==> READ F2 ==> APPEND F3 ==> CREATE"
- 620 COLOR 6,0,0:LOCATE 7,1,0:PRINT"....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...."
- 630 Q$="":WHILE Q$<>"1" AND Q$<>"2" AND Q$<>"3"
- 640 POKE 106,0
- 650 Q$=INKEY$
- 660 WEND:T=VAL(Q$):IF T=1 THEN 670 ELSE IF T=2 THEN 680 ELSE 690
- 670 OPEN "BULLETIN.XTM" FOR INPUT AS #1:GOTO 710
- 680 OPEN "BULLETIN.XTM" FOR APPEND AS #1:COLOR 7,0,0:GOTO 790
- 690 OPEN "BULLETIN.XTM" FOR OUTPUT AS #1:COLOR 7,0,0:GOTO 790
- 700 FOR I=8 TO 23:LOCATE I,1,0:PRINT R$:NEXT I
- 710 IF EOF(1) THEN CLOSE:GOTO 760
- 720 LINE INPUT #1,H$
- 730 LOCATE CTR,1,0:PRINT H$
- 740 CTR=CTR+1:IF CTR<21 THEN 710 ELSE CTR=8
- 750 LOCATE 23,53,0:INPUT"......<ENTER) to continue";ANS$:GOTO 700
- 760 LOCATE 23,40,0:INPUT"MESSAGE COMPLETE.....<ENTER> when ready";ANS$
- 770 COLOR 7,0,0:GOTO 70
- 780 '
- 790 ' ============= MESSAGE INPUT ==========
- 800 '
- 810 LOCATE 5,58,0:PRINT"Input begins, enter 'DONE' to end":GOTO 830
- 820 FOR I=8 TO 23:LOCATE I,1,0:PRINT R$:NEXT I
- 830 LOCATE CTR,1,0:INPUT"",H$
- 840 IF H$="DONE" OR H$="done" THEN CLOSE:GOTO 890
- 850 LENGTH=LEN(H$):IF LENGTH>80 THEN 830
- 860 PRINT#1,H$
- 870 CTR=CTR+1:IF CTR>=23 THEN CTR=8:GOTO 820
- 880 GOTO 830
- 890 LOCATE 23,26,0:PRINT"DATA ENTRY COMPLETE........."
- 900 FOR I=1 TO 2500:NEXT I
- 910 COLOR 7,0,0:GOTO 70
- 920 ' ========== INSERT UTILITIES HERE ==========
- 930 ' = =
- 940 ' = =
- 950 ' = =
- 960 ' = =
- 970 ' = =
- 980 ' = =
- 990 ' ===========================================
- 1000 GOTO 70
- 1010 '
- 1020 ' ========== SET SYSTEM PARMETERS ==========
- 1030 '
- 1040 DIM PATH$(SELECT):FOR I=1 TO SELECT:READ PATH$(I):NEXT I
- 1050 DIM OPT$(SELECT+1):FOR I=1 TO SELECT+1:READ OPT$(I):NEXT I
- 1060 FOR I=1 TO 10:Z$=RIGHT$(STR$(I),1):KEY I,Z$:NEXT I
- 1070 R$=SPACE$(78)
- 1080 DIR$="C:\MASTER\" 'SELECT DIRECTORY LEVELS
- 1090 DATA "ISPF","PASCAL","DBASE","GAMES","LOTUS","PCTALK"
- 1100 DATA " F1 ISPF - Exit to Screen Productivity Facility"
- 1110 DATA " F2 PAS - Pascal compiler subsystem"
- 1120 DATA " F3 DB - Exit to DBASE macro language"
- 1130 DATA " F4 GMS - Select GMS menu option"
- 1140 DATA " F5 123 - Lotus 1-2-3 spreadsheet"
- 1150 DATA " F6 PCT - Begin PCTALK III communications"
- 1160 DATA " F7 - Exit to Menu"
- 1170 RETURN
- 1500 '
- 1510 '
- 1520 '*****************************************************************
- 1530 '
- 1540 ' This program acts as an applications control and utility
- 1550 ' menu. To use it in its current form you should have DOS 2.0
- 1560 ' or a higher release. It works by utilizing the directory
- 1570 ' capabilities in BASICA and a series of batch files. I use a
- 1580 ' program called MENU.BAT to start things rolling. This file
- 1590 ' is as follows :
- 1600 '
- 1610 ' echo off <<=== turn off the echo function
- 1620 ' cls <<=== clear screen
- 1630 ' basica xtmenu.bas <<=== execute the primary menu
- 1640 ' xtm.bat <<=== execute application batch file in
- 1650 ' directory ???
- 1660 '
- 1670 ' Each application must have its own subdirectory and files.
- 1675 ' The XTMENU file uses the root directory which must contain
- 1680 ' BASICA.COM. For instance if you are using PC-Talk then all
- 1690 ' of the associated files for it should be in one directory called
- 1700 ' PCTALK or whatever. When the program is run it changes the
- 1710 ' current directory using the CHDIR command and then returns
- 1720 ' control to the system. As shown above the system then
- 1730 ' executes the XTM.BAT file. The XTM.BAT file resides in each
- 1740 ' application directory so DOS doesnt fuss too much. A sample XTM
- 1750 ' file looks like this :
- 1760 '
- 1770 ' cls <<=== clear screen
- 1780 ' pc-talk.exe <<=== execute any application
- 1790 ' cd\ <<=== change to root directory
- 1800 ' xtmenu.bat <<=== rerun the menu program
- 1810 '
- 1820 ' A XTM.BAT file must also reside in the root directory with
- 1830 ' the XTMENU file. Mine does the following on menu termination :
- 1840 '
- 1850 ' cls
- 1860 ' dir *.ba?
- 1870 '
- 1873 ' =====>> SETUP
- 1877 '
- 1880 ' The file MESSAGE.XTM should also be in the root directory.
- 1890 ' Use the CREATE option to place one there in your initial setup.
- 1900 '
- 1910 ' LINE 50 - Change the variable 'SELECT' to the number of
- 1920 ' applications you wish to use (UP TO 10).
- 1930 '
- 1940 ' LINE 450 - Change this to the number of selection you like plus
- 1950 ' one to exit back to the menu. This line could be
- 1960 ' changed to a loop but I leave that for you.
- 1970 '
- 1980 ' LINE 920 - The utilities I use are the Norton Utilities which
- 1990 ' I execute with the SHELL command in DOS 3.0. Since
- 2000 ' most people do not yet have this release I have
- 2010 ' omitted these routines to let somebody add their
- 2020 ' own favorites.
- 2030 '
- 2040 ' LINE 1080 - The variable DIR$ should be changed to your system
- 2050 ' needs. It provides the path to the application
- 2060 ' directories you need. All Applications should be on
- 2070 ' the same level . If they are not then use line
- 2080 ' 1090 to make corrections to the proper path.
- 2090 '
- 2100 ' LINE 1090 - This line contains the names of the directories
- 2110 ' to be accessed for each application and should
- 2120 ' be changed to your system needs.
- 2130 '
- 2140 ' LINE 1100 - This group of lines is displayed for the application
- 2150 ' menu.
- 2160 '
- 2170 ' This program should be changed to your own needs and
- 2180 ' could be enhanced quite a bit. If you do have problems with
- 2190 ' it then leave a message on the bulletin board.
- 2200 '
- 2210 ' Dave Armbruster
- 2220 '
- 2230 '*****************************************************************
-